Skip to content

Conversation

@rurikoaraki
Copy link
Collaborator

@rurikoaraki rurikoaraki commented Jan 28, 2025

Potential fix for https://github.com/microsoft/fluentui-react-native/security/code-scanning/3

To fix the prototype pollution issue, we need to ensure that the key value used in the ensureAndReturn function is validated and does not include dangerous property names like __proto__, constructor, or prototype. We can achieve this by adding a check to reject these keys before performing the assignment.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

From Ruriko: I have checked the code and it's in line with the suggestions attached to the CodeQL alert for how to fix the issue.

rurikoaraki and others added 2 commits January 28, 2025 13:20
…gnment

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@rurikoaraki rurikoaraki marked this pull request as ready for review January 28, 2025 21:25
@rurikoaraki rurikoaraki requested a review from a team as a code owner January 28, 2025 21:25
@rurikoaraki rurikoaraki reopened this Jan 28, 2025
@rurikoaraki rurikoaraki merged commit 86ea355 into main Jan 29, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants